EMT Practice Test

1. Question Content...


Question List

Question1: The Salesforce Administrator created a custom picklist field, Account_status_c, on the a Account object. This picklist has possible values of Inactive'' and Active?
As part of a new business process, management wants to ensure an opportunity record is created only for Accounts marked as "Active". A developer is asked to implement this business requirement.
Which two automation tools should be used to fulfill the business need?
Choose 2 answers

Question2: While writing an Apex class that creates Accounts, a developer wants to make sure that all required fields are handled properly.
Which approach should the developer use to be sure that the Apex class works correctly?

Question3: A Salesforce developer wants to review their code changes immediately and does not want to install anything on their computer or on the org.
Which tool is best suited?

Question4: Universal Containers decides to use exclusively declarative development to build out a new Salesforce application. Which three options should be used to build out the database layer for the application? Choose 3 answers

Question5: A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override. What is the correct implementation of the ShippingCalculator class?

Question6: A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the following options: 'Vegan','Kosher','No Preference'. The developer must ensure a value is populated every time a record is created or updated. What is the most efficient way to ensure a value is selected every time a record is saved?

Question7: A developer of Universal Containers is tasked with implementing a new Salesforce application that must be able to by their company's Salesforce administrator.
Which three should be considered for building out the business logic layer of the application? Choose 3 answers

Question8: Which two events need to happen when deploying to a production org? Choose 2 answers

Question9: A developer created a Lightning web component called statusComponent to be inserted into the Account record page.
Which two things should the developer do to make the component available?

Question10: Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers

Question11: Which annotation exposes an Apex class as a RESTful web service?

Question12: Which two statements are true about Getter and Setter methods as they relate to Visualforce?

Question13: In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers

Question14: What should be used to create scratch orgs?

Question15: A developer is asked to create a Visualforce page for Opportunities that allows users to save or merge the current record.
Which approach should the developer to meet this requirement?

Question16: A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

Question17: Which three data types can a SOQL query return? Choose 3 answers

Question18: Universal Containers has a Visualforce page that displays a table of every Container_c. being ....... Is falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question19: Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which three options can be used to build out the business logic layer for this application?
Choose 3 answers

Question20: What is the result of the following code?

Question21: Which code displays the contents of a Visualforce page as a PDF?

Question22: A developer wants to invoke on outbound message when a record meets a specific criteria.
Which three features satisfy this use case?
Choose 3 answer

Question23: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records. which Visualforce feature supports this requirement?

Question24: What should a developer use to fix a Lightning web component bug in a sandbox?

Question25: A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item is not stock.
Which relationship implementation supports these requirements?

Question26: A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?

Question27: Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage.
Which two strategies should a developer use to accomplish this? Choose 2 answers

Question28: A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?

Question29: How should a custom user interface be provided when a user edits an Account in Lightning Experience?

Question30: A developer must create a lightning component that allows users to input contact record information to create a contact record, including a salary__c custom field. what should the developer use, along with a lightning-record-edit form, so that salary__c field functions as a currency input and is only viewable and editable by users that have the correct field levelpermissions on salary__C?

Question31: Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the standard Account object. Based on some internal discussion, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able todo so. What is apossible reason that this change was not permitted?

Question32: What are two ways for a developer to execute tests in an org?

Question33: Which code displays the content of Visualforce page as PDF?

Question34: Which action may cause triggers to fire?

Question35: A developer created a child Lightning web component nested inside a parent Lightning web component, parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers

Question36: A developer created these three Rollup Summary fields in the custom object, Project_ct,

The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to Implement the business requirement in order to minimize maintenance overhead?

Question37: A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debtAmount' should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers

Question38: The Account object in an organization has a master detail relationship to a child object called Branch. The following automations exist:
* Rollup summary fields
* Custom validation rules
* Duplicate rules
A developer created a trigger on the Account object.
What two things should the developer consider while testing the trigger code?
Choose 2 answers

Question39: An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts method?

Question40: An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update should the developer make in the Flow?

Question41: A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use data Loader instead of Data Import Wizard?

Question42: Given the following Apex statement:
Account myAccount = [SELECT Id, Name FROM Account];
What occurs when more than one Account is returned by the SOQL query?

Question43: A software company uses the following objects and relationships:
* Case: to handle customer support issues
* Defect_c: a custom object to represent known issues with the company's software
* case_Defect__c: a junction object between Case and Defector to represent that a defect Is a customer issue What should be done to share a specific Case-Defect_c record with a user?

Question44: A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?

Question45: A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of new Apex helper class. Change Set deployment to production fails with the test coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required" What should the developer do to successfully deploy the new Apex trigger and helper class?

Question46: In the following example, which sharing context will myMethod execute when it is invoked?

Question47: What are two benefits of using declarative customizations over code? Choose 2 answers What are two benefits of using declarative customizations over code?

Question48: Refer to the following code that runs in an Execute Anonymous block:

In an environment where the full result set is returned, what is a possible outcome of this code?

Question49: Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package namespace?

Question50: A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of test allowing them to test independent requirements various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?

Question51: A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculation and redirect the user to a custom visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers

Question52: Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds ^Decommissioned" as a picklist value for the Status__: custom field within the Contact__c object.
Which tool should the developer use to enforce only Container records with a status of "Decommissioned" can be deleted?

Question53: How does the Lightning Component framework help developers implement solutions faster?

Question54: What are two ways that a controller and extension can be specified on a Visualforce page?
Choose 2 answers

Question55: What is the value of the Trigger.old context variable in a Before Insert trigger?

Question56: An org has an existing Visual Flow that creates an Opportunity with an Update records element. A developer must update the Visual Flow also created a Contact and store the created Contact's ID on the Opportunity.

Question57: Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?

Question58: Universal container wants a list button to display a visualforce page that allows users to edit multiple records which visualforce feature supports this requirement.

Question59: Considering the following code snippet:

When the code executes a DML exception is thrown.
How should the developer modify the code to ensure exceptions are handled gracefully?

Question60: A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded In a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?

Question61: A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the PaymentProcessor interface class?

Question62: Which two types of process automation can be used to calculate the shipping cost for an Order when the Order is placed and apply a percentage of the shipping cost of some of the related Order Products?
Choose 2 answers

Question63: When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

Question64: A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.
What should a developer do to allow their code to move some existing Orderltem records to a new Order record?

Question65: A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration chat reads task records is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?

Question66: A developer creates a custom exception as shown below:
What are two ways the developer can fire the exception in Apex? Choose 2 answers

Question67: Which three statements are accurate about debug logs? Choose 3 answers

Question68: What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers

Question69: How should a developer write unit tests for a private method in an Apex class?

Question70: A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?

Question71: Which two examples above use the system. debug statements to correctly display the results from the SOQL aggregate queries? Choose 2 answers

Question72: A developer identifies the following triggers on the Expense_c object:
DeleteExpense,
applyDefaultstoexpense
validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practice are followed?

Question73: A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

Question74: Refer to the following code snippet for an environment that has more than 200 Accounts belonging to the Technology' industry:

which three statements are accurate about debug logs?
Choose 3 answers

Question75: Universal Containers has an order system that uses on Order Number to identify an order for customers service agents. Order records will be imported into Salesforce.
How should the "Order Number field be defined in Salesforce.

Question76: The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

Question77: When importing and exporting data into Salesforce, whichtwo statements are true?
Choose 2 answers

Question78: How can a developer implement this feature?

Question79: An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.
How can this be achieved?

Question80: AW Computing tracks order information in custom objects called order__c and order_Line_ c - Currently, all shipping information is stored in the order__c object.
The company wants to expand Its order application to support split shipments so that any number of order_Line__c records on a single order__c can be shipped to different locations.
What should a developer add to fulfill this requirement?

Question81: Which two characteristics are true for Aura component events? Choose 2 answers

Question82: what are the methods used to show input in classic and lightning ?

Question83: A developer has two custom controller extensions where each has a save() method.
Which save() method will be called for the following Visualforce page?
<apex:page standardController ="Account", extensions="ExtensionA, ExtensionB">
<apex:commandButton action ="{!save}" value="Save"/>
</apex:page>

Question84: A developer needs to create a custom Interface in Apex.
Which three considerations must the developer keep in mind while developing the Apex Interface?
Choose 3 answers

Question85: Which code in a Visualforce page and/or controller might present a security vulnerability?

Question86: Refer to the following Apex code:

What is the value of x when it is written to the debug log?

Question87: A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override.
What is the correct implementation of the ShippingCalculator class?

Question88: A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator wishes to expose the component only on Record Page Layouts.
Which two actions should the developer take to accomplish this business objective?
Choose 2 answers

Question89: A Salesforce Administrator used Flow Builder to create a flow named ''accountOnboarding''. The flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?

Question90: When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be update based on the values in a PostalCodeToTimezone__c custom object. How should a developer implement this feature?

Question91: Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a server Update platform event.
The developer is working on a Lightning web component to display the information.

Question92: A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent.
Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?

Question93: The following automations already exist on the Account object;
* A workflow rule that updates a field when a certain criteria is met
* A custom validation on a field
* A How that updates related contact records
A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?

Question94: A developer has to identify a method in en Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a SOQL statement to save the changes to the database.
Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits?
Choose 2 answers

Question95: Where are two locations a developer can look to find information about the status of asynchronous or future methods? Choose 2 answers

Question96: A develop created these three roll-up summary fields on the custom object. Project_c:

The developer is asked to create a new field that should the ratio between rejected and approved timesheet for a given project.
What are two benefits of choosing a formula held instead of an Apex trigger to fulfill the request? Choose 2 answers

Question97: While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.
Which approach should the developer use to be sure that the Apex class is working according to specifications?

Question98: Universal Container uses Service Cloud with a custom field, stage_c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to '';Waiting on customer'' The .... Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers

Question99: What is an example of a polymorphic lookup field in Salesforce?

Question100: Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?
A)

B)

C)

D)

Question101: A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?
A)

B)

C)

D)

Question102: What is a key difference between a Master-Detail Relationship and a Lookup Relationship?

Question103: A developer writes a single trigger on the Account object on the after insert and after update events. A workflow rule modifies a field every time an Account is created or updated.
How many times will the trigger fire if a new Account is inserted, assuming no other automation logic is implemented on the Account?